<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
    <link rel="stylesheet" href="/css/skin.css"/>
    <style>
        .form-well .row{
            max-width: 100%;
        }
        .form-info {
            padding: 20px;
            border-color: #edf1f8;
            border-radius: 12px;
            background-color: #fdfeff;
        }
        .form-info h3 {
            height: 36px;
            padding: 0 14px;
            margin: 0 0 16px;
            border-radius: 4px;
            background-color: #f0f4f8;
            line-height: 36px;
            font-size: 13px;
            color: #707b8d;
        }
        .form-actions {
            text-align: center;
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            margin-bottom: 20px;
        }
        .relats{
            position: relative;
            padding-bottom: 50px;
        }
        .add-all-hide{
            display: none;
        }
        .nomemberProductListTable{
            display: none;
        }
        .wrap-black{
            display: flex;
            flex-wrap: wrap;
        }
    </style>
</head>
<body>
<div class="container-fluid p-t-15">
    <div class="row">

        <div class="card relats">
            <div class="card-header">
                <h1>新增优惠券</h1>
            </div>
            <div class="card-body">
                <div class="well form-info" >



                    <h3>基本信息</h3>

                    <form id="couponForm" autocomplete="off" class="form-coupon" >
                        <div class="" >

                            <div class="row wrap-black" style="padding: 0 20px;box-sizing: border-box;">

                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                    <label class="control-label label-required" >优惠券名称</label>
                                    <div class="form-content">
                                        <input id="couponName" name="couponName" type="text" class="form-control" placeholder="请输入"  data-live-search="true">

                                    </div>
                                </div>

                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                    <label class="control-label label-required" >优惠券类型</label>
                                    <div class="form-content">
                                        <select id="couponType"  title="优惠券类型" onchange="changeCouponType(this)" name="couponType" class="form-control selectpicker"  data-live-search="true">
                                            <option value="">请选择</option>
                                            <option value="1">折扣类</option>
                                            <option value="2">额度类</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                    <label class="control-label label-required" >优惠券数量</label>
                                    <div class="form-content">
                                        <input id="couponCount" name="couponCount" type="number" min="0" class="form-control" placeholder="请输入"  data-live-search="true">
                                    </div>
                                </div>

                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12 change-quota">
                                    <label class="control-label label-required" >优惠券额度</label>
                                    <div class="form-content">
                                        <input id="couponQuota" name="couponQuota" type="text" class="form-control" placeholder="请输入"  data-live-search="true">
                                    </div>
                                </div>
                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12 change-discount">
                                    <label class="control-label label-required" >优惠券折扣</label>
                                    <div class="form-content">
                                        <input id="couponDiscount" name="couponDiscount" type="text" class="form-control" placeholder="请输入"  data-live-search="true">

                                    </div>
                                </div>

                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12 ">
                                    <label class="control-label label-required" >优惠券使用方式</label>
                                    <div class="form-content">
                                        <select id="useType"  title="优惠券使用方式" name="useType" class="form-control selectpicker"  data-live-search="true">
                                            <option value="">请选择</option>
                                            <option value="0">叠加使用</option>
                                            <option value="1">不可叠加使用</option>

                                        </select>
                                    </div>
                                </div>
                                <div class="form-group col-lg-4 col-md-4 col-sm-4 col-xs-12">
                                    <label class="control-label label-required" >优惠券使用有效期</label>
                                    <div class="form-content input-group">
                                        <input type="text" id="startDate" name="startDate" class="form-control search-time date-input"
                                               placeholder="起" autocomplete="off">
                                        <span class="input-group-addon">-</span>
                                        <input type="text" id="endDate" name="endDate" class="form-control search-time date-input"
                                               placeholder="止" autocomplete="off">
                                    </div>
                                </div>
                            </div>



                        </div>

                        <div class="form-actions">
                            <button class="btn btn-primary "  type="button" name="submit" id="submit"  onclick="submitClick()" >提交</button>
                            <button class="btn btn-default" type="reset" onclick="resetClcik()">重置</button>
                        </div>
                    </form>




                </div>

                <div class="well form-well" >
                    <h3>产品信息</h3>
                    <div class="row">
                        <div class="col-sm-4" style="display: flex;align-items: center;height: 38px;">
                            <div style="margin-right: 20px;">
                                <input type="radio" value="1" name="scopeOfApplication" style="margin-right: 10px;" onclick="productAllPart(0)">全部产品
                            </div>
                            <div style="margin-right: 20px;">
                                <input type="radio" value="0" name="scopeOfApplication" style="margin-right: 10px;" onclick="productAllPart(1)">部分产品
                            </div>
                        </div>

                        <div class="col-sm-8 add-all-hide" >
                            <div class="pull-right">
                                <button type="button" class="btn btn-label btn-success"  data-toggle="modal" data-target="#addProduct"
                                        aria-expanded="false" aria-controls="addProduct">
                                    <label><i class="mdi mdi-plus"></i></label>添加产品
                                </button>
                            </div>
                        </div>

                        <div class="col-sm-12 add-all-hide" style="margin-top: 15px;">
                            <table id="productList"></table>
                        </div>

                    </div>
                </div>



            </div>
        </div>
    </div>
</div>





<!-- 添加产品 弹窗 -->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="addProduct">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4>添加产品</h4>
            </div>
            <div class="modal-body">
                <input type="text" value="1" id="productModalType" hidden>
                <div class="headerContainer clearfix">
                    <ul class="new-tabs pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <!-- 全部 会员客户 非会员客户-->
                        <li class="nav-item active">
                            <a href="#" data-toggle="tab" aria-expanded="false"  onclick="memberProductFunClick(0)">会员产品</a>
                        </li>
                        <li class="nav-item">
                            <a href="#" data-toggle="tab" aria-expanded="false"  onclick="memberProductFunClick(1)">非会员产品</a>
                        </li>
                    </ul>
                </div>
                <div class="memberProductListTable">
                    <table id="memberProductListTable"></table>
                </div>
                <div class="nomemberProductListTable" >
                    <table id="nomemberProductListTable"></table>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="addPartProduct()">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!-- 图表 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!-- 子页面公用js -->
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-tagsinput/typeahead.bundle.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>
<script src="/js/bootstrapTableSelect.js"></script>
<script type="text/javascript" src="/js/crm/common/common.js"></script>
<!--<script src="/js/crm/common/pageCommon.js"></script>-->
<script src="/js/crm/activityManager/addCoupon.js"></script>
</html>